
#ifndef wu_ANIMALXMLMANAGER_H
#define wu_ANIMALXMLMANAGER_H

#pragma once
#include "wuAnimalXML.h"
#include "wuBase2dManager.h"
#include "wuSkin.h"

#define ANIMALXML_MAX 6

class wuAnimalXMLManager : public wuBase2dManager
{
    public:
        wuAnimalXMLManager();
        ~wuAnimalXMLManager();

	    void setup(ofxBox2d * _box2d, string _XMLfilename, int _vw, int _vh);
		bool action(ofImage *currImg, ofImage *bgImg, int action, int x_offset);
		void update();
		void addBitxo(ofImage *_skin, ofRectangle rect, vector <ofPoint> * _pts);
        void draw(bool pinta_bg=false, int offX=0);
        void drawSelected(bool pinta_bg=false, int offX=0);
        void clear(void);
		void OrderSkins();
		void touch(int _x,int _y, int forceX=300, int forceY=0);
		bool drag(int _x, int _y);
		void dragOff();
        void clear_actives();
		// box2d
		wuAnimalXML animals[ANIMALXML_MAX];
//		wuAnimalXML animal;

        int num_elem;
		// skins of pieces
        vector <wuSkin> skins;

		wuSkin skinInit;
		ofRectangle rectInit;

		string XMLfilename;

		int ongoing_action;
		bool bPintaCambiazo;
};
#endif

